using LaughingDog;
using LaughingDog.Components;
using LaughingDog.GameObjects;
using LaughingDog.Input;
using LaughingDog.Managers;

namespace LaughingDog.Scripts
{
    public class AttachToMouse : Script
    {
        /// <summary>
        /// Creates a new instance of a AttachToMouse script component.
        /// </summary>
        /// <param name="gameObject">The GameObject that this component should be attached to.</param>
        public AttachToMouse(GameObject gameObject)
            : base(gameObject)
        {

        }

        /// <summary>
        /// Updates this component.
        /// </summary>
        public override void Update()
        {
            Transform.Position = InputManager.Instance.Mouse.Position;

            base.Update();
        }      
    }
}